import { reactive, ref } from "vue";

export default function InitHook() {
  const searchForm = reactive<AgencyBalance.SearchForm>({
    id: "",
    companyIdList: []
  });
  const asyncTable = ref<boolean>(false);
  const tableData = ref<Array<AgencyBalance.ListRows>>([]);
  const tableColumn = ref<Array<SuperTable.NestTableColumnItem | SuperTable.TableCoulmnItem>>([]);
  const loading = ref<boolean>(false);
  const tableRef = ref<any>(null);
  const drawerOpts = reactive<Base.DrawerOpts>({
    title: "",
    width: "",
    visible: false,
    component: "Details",
    type: 0
  });
  return {
    searchForm,
    tableData,
    loading,
    tableColumn,
    drawerOpts,
    asyncTable,
    tableRef
  };
}
